from libs.exception import BaseHTTPException
from flask_babel import gettext as _

class HTTPCharacterCreateParamError(BaseHTTPException):
    error_code = "character_param_error"
    code = 400
    def __init__(self,message:str|None):
        self.description = _("Character create parameter error.{message}").format(message=message)
        super().__init__(self.description)

class HTTPCharacterNotExistError(BaseHTTPException):
    error_code = "character_not_exist_error"
    code = 400
    def __init__(self,character_id:str|None):
        self.description = _("Character not exist.{character_id}").format(character_id=character_id)
        super().__init__(self.description)